package services;

import java.util.Set;

import utils.Commande;
import utils.Resultat;
import utils.Sante;
import contracts.ContractException;

public interface MoteurJeuService {
	
	/* Observators */	
	public int getMaxPasJeu();
	public int getPasJeuCourrant();
	public int getHerosX();
	public int getHerosY();
	public int getKidnappeurX();
	public int getKidnappeurY();
	public Sante getHerosSante();
	public Sante getKidnappeurSante();
	public int getForceVitaleKidnappeur();
	public int getHerosForceVitale();
	public TerrainService getTerrain();
	public Set<Integer> getBombeNumeros();
	public int getNbBombes();
	public int getNbVilains();
	public Set<VilainService> getListeVilain();
	public boolean bombeExiste(int num);
	public boolean vilainExiste(int num);
	
	/* pre bombeExiste(num) */
	public BombeService getBombe(int num) throws ContractException;
	public VilainService getVilain(int num) throws ContractException;
	public boolean estFini();
	
	/* pre estFini() */
	public Resultat resultatFinal() throws ContractException;
	
	/* pre bombeExiste(num) */
	public boolean misEnJoue(int x, int y, int num) throws ContractException;
	
	/* Constructors
	   	pre init(m) require m>= 0
	*/
	public void init(int maxPasJeu) throws ContractException;
	
	/* Operators
	    pre !(estFini())
	 */
	public void pasJeu(Commande c, boolean bool) throws ContractException;
	
	
	/* Observations :
		[invariants]
     		0 <= getPasJeuCourrant() <= getMaxPasJeu()
     		1 <= getHerosX() <= getTerrain().getNombreColonnes()
     		1 <= getHerosY() <= getTerrain().getNombreLignes()
     		3 <= getHerosForceVitale() <= 11
     		getNbBombes() = getBombeNumeros().size()
     		bombeExiste(num) = 
		[init]
       		getMaxPasJeu(init(p)) = p
      		getPasJeuCourrant(init(p)) = 0
	 */
	
	
}
